pub fn convert_base(num_str: &str, to_base: u32) -> String {
    // 从 num_str 提取数字和进制，格式：数字(进制)
    let (num, from_base) = num_str.split_at(num_str.find('(').unwrap());
    let from_base = from_base.trim_matches(&['(', ')'] as &[_]);
    let num = u32::from_str_radix(num, from_base.parse().unwrap()).unwrap();

    // 转换为 to_base 进制
    let mut result = String::new();
    let mut num = num;
    while num > 0 {
        let digit = num % to_base;
        let c = if digit < 10 {
            (b'0' + digit as u8) as char
        } else {
            (b'a' + (digit - 10) as u8) as char
        };
        result.insert(0, c);
        num /= to_base;
    }

    result
}
